package com.xh.rufongwallpaper.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 下载记录实体类
 *
 * @author XH
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("download_record")
public class DownloadRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 设备ID
     */
    @TableField("device_id")
    private String deviceId;

    /**
     * 壁纸ID
     */
    @TableField("wallpaper_id")
    private Long wallpaperId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("is_deleted")
    @TableLogic
    private Boolean isDeleted;

    /**
     * 壁纸对象（非数据库字段）
     */
    @TableField(exist = false)
    private Wallpaper wallpaper;

    /**
     * 设备对象（非数据库字段）
     */
    @TableField(exist = false)
    private Device device;
} 